jQuery(document).ready(function($) {
    // $() will work as an alias for jQuery() inside of this function
    //        var $select = $('#page_template');
    //        alert($select.html());

//Zamiana select szablonu na radio buttony
    $('#page_template').find('option').each(function(j, option){
        var $option = $(option);
        // Create a radio:
        var $radio = $('<input type="radio" />');
        // Set name and value:
        $radio.attr('name', $('#page_template').attr('name')).attr('value', $option.val());
        // Set checked if the option was selected
        if ($option.attr('selected')) $radio.attr('checked', 'checked');
        // Insert radio before select box:
        $('#page_template').before($radio);
        // Insert a label:
        $('#page_template').before(
            $label = $("<label />").attr('for', $('#page_template').attr('name')).text($option.text())
            );
                if($label.text() == 'Domyślny szablon') $label.html('<img src="../wp-content/plugins/abee/images/admin/content.png" style="width:50px"/>');
                if($label.text() == 'Kolumna z lewej') $label.html('<img src="../wp-content/plugins/abee/images/admin/sidebar-content.png" style="width:50px"/>');
                if($label.text() == 'Kolumna z prawej') $label.html('<img src="../wp-content/plugins/abee/images/admin/content-sidebar.png" style="width:50px"/>');
                if($label.text() == 'Strona Główna') $label.html('<img src="../wp-content/plugins/abee/images/admin/content.png" style="width:50px"/>');
        
        // Insert a <br />:
        $('#page_template').before("<br/>");
    });
    $('#page_template').remove();
    
    
//    Usunięcie linku zobacz
    $('.row-actions span.view').hide();
    $('span.delete').each(function(i,row){
        $(this).html($(this).find('a') );
    });
    
    $('#footer-upgrade').html('Pomoc: tel. <a href="skype://796 467 752">796 467 752</a> <a href="mailto:pomoc@abee.pl">pomoc@abee.pl</a>');
    
    $('.tablenav.top div:last-child').addClass('last-child');
});


